<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("path", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>类别管理</TITLE>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=path%>/zTree/css/demo.css"
	type="text/css">
<link rel="stylesheet" href="<%=path%>/zTree/css/tree.css"
	type="text/css">
<link rel="stylesheet"
	href="<%=path%>/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript"
	src="<%=path%>/zTree/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/zTree/js/jquery.ztree.core.js"></script>
<script type="text/javascript"
	src="<%=path%>/zTree/js/jquery.ztree.excheck.js"></script>
<script type="text/javascript"
	src="<%=path%>/zTree/js/jquery.ztree.exedit.js"></script>
<script type="text/javascript">
function deleteAdv(id){
	 window.open("<%=path%>/adv/delAdv.do?id="+id,"_self");
}
</script>
</HEAD>

<BODY>

	<div class="">
		
		<table border="1px">
		<tr>
			<td>编号</td>
			<th>名称</th>
			<th>价格</th>
			<th>操作</th>
		</tr>

		<c:forEach items="${requestScope.queryAdv}" var="adv">

			<tr>
				<td>${adv.id}</td>
				<td>${adv.goodsType}</td>
				<td>
				<img src="<%=path%>/adv/${adv.imgName}" height="200px" width="600px"/>
				</td>

				<th><input type="button" value="删除" onclick="deleteAdv(${adv.id})">
				</th>
			</tr>
		</c:forEach>

	</table>
	</div>

</BODY>
</HTML>